/*********************************************************
 *  Copyright (c) 2011 by Web Information Systems (WIS) Group, 
 *  Delft University of Technology.
 *  Qi Gao, http://wis.ewi.tudelft.nl/index.php/home-qi-gao
 *  
 *  Some rights reserved.
 *
 *  Contact: q.gao@tudelft.nl
 *
 **********************************************************/
package org.persweb.genius.enrichment;

import java.util.List;

import org.persweb.genius.enrichment.util.SpotlightUtility;
import org.persweb.genius.model.Concept;
import org.persweb.genius.model.Filter;
import org.persweb.genius.model.Item;

/**
 * @author Qi Gao <a href="mailto:q.gao@tudelft.nl">q.gao@tudelft.nl</a>
 * @version created on Jun 29, 2011 4:05:52 PM
 */
public class SpotlightEnrich implements Enrichment {
	
	private List<Item> items = null;
	private Filter filter = null;
	
	/**
	 * 
	 */
	public SpotlightEnrich() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	/**
	 * @param items
	 */
	public SpotlightEnrich(List<Item> items) {
		super();
		this.items = items;
	}

	/**
	 * @param filter
	 */
	public SpotlightEnrich(Filter filter) {
		super();
		this.filter = filter;
	}

	/**
	 * @param items
	 * @param filter
	 */
	public SpotlightEnrich(List<Item> items, Filter filter) {
		super();
		this.items = items;
		this.filter = filter;
	}

	/**
	 * @return the items
	 */
	public List<Item> getItems() {
		return items;
	}

	/**
	 * @param items the items to set
	 */
	public void setItems(List<Item> items) {
		this.items = items;
	}

	/**
	 * @return the filter
	 */
	public Filter getFilter() {
		return filter;
	}

	/**
	 * @param filter the filter to set
	 */
	public void setFilter(Filter filter) {
		this.filter = filter;
	}

	/* (non-Javadoc)
	 * @see org.persweb.genius.enrichment.Enrichment#getConcepts(java.lang.String)
	 */
	@Override
	public List<Concept> getConcepts(String input) {
		
		return SpotlightUtility.getEntities(input);
	}

	/* (non-Javadoc)
	 * @see org.persweb.genius.enrichment.Enrichment#enrich(java.util.List)
	 */
	@Override
	public List<Item> enrich(List<Item> items) {
		return SpotlightUtility.getEntities(items);
	}

	/* (non-Javadoc)
	 * @see org.persweb.genius.enrichment.Enrichment#enrich(java.util.List, org.persweb.genius.filter.Filter)
	 */
	@Override
	public List<Item> enrich(List<Item> items, Filter filter) {
		return SpotlightUtility.getEntities(items,filter);
	}

}
